#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main() {
    int a, b;
    int shang = 0, yushu = 0;
    scanf("%d %d", &a, &b);
    shang = a / b;
    yushu = a % b;
    printf("%d %d", shang, yushu);

    return 0;
}